// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.

import App from './App'
import router from './router'
import Vue from 'vue'
import ElementUI from 'element-ui'
import fastclick from 'fastclick'
import 'element-ui/lib/theme-chalk/index.css'
import 'common/stylus/index.styl'
import VueQuillEditor from 'vue-quill-editor'
import store from './store/store'
// require styles 引入样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import global from '@/common/Global'
import axios from 'axios'

const host = process.env.NODE_ENV === 'development' ? 'http://www.yuzhekeji.club:8080' : 'http://www.yuzhekeji.club:8080' // 根据 process.env.NODE_ENV 的值判断当前是什么环境

const instance = axios.create({
  baseURL: host
})

Vue.prototype.$http = instance
Vue.prototype.GLOBAL = global
Vue.use(VueQuillEditor)

fastclick.attach(document.body)
Vue.use(ElementUI)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  store,
  template: '<App/>'
})
